using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Yunwei.Domain.Models.Mapping
{
    public class OrderFoodRelMap : EntityTypeConfiguration<OrderFoodRel>
    {
        public OrderFoodRelMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Count)
                .IsRequired();

            // Table & Column Mappings
            this.ToTable("OrderFoodRel");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Count).HasColumnName("Count");
            this.Property(t => t.Order_Id).HasColumnName("Order_Id");
            this.Property(t => t.Food_Id).HasColumnName("Food_Id");
        }
    }
}
